import time
def metric(fn):
    def measure_time(*args,**kw):
      start_time = time.time()
      result = fn(*args,**kw)
      end_time = time.time()
      print('耗时：{:.4f}s'.format(end_time - start_time))
      return result
    return measure_time